//
//  YXYGroupHotNineCollectionViewCell.m
//  Topit
//
//  Created by dllo on 15/12/11.
//  Copyright © 2015年 YXY. All rights reserved.
//

#import "YXYGroupHotNineCollectionViewCell.h"

@implementation YXYGroupHotNineCollectionViewCell
-(void)dealloc {
    [_imageUrl release];
    [_myImage release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.myImage = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self addSubview:_myImage];
        [_myImage release];
    }
    return self;
}

- (void)setImageUrl:(NSString *)imageUrl {
    if (_imageUrl != imageUrl) {
        [_imageUrl release];
        _imageUrl = [imageUrl retain];
    }
    [_myImage sd_setImageWithURL:[NSURL URLWithString:imageUrl]];
    
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    _myImage.frame = CGRectMake(1, 0, self.width - 5, self.height - 5);
    [_myImage nightMode];
}

@end
